<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require_once 'Process/dbconnector.php';
if(isset ($_GET['p']))
{
    $aktivasi = $_GET['p'];
    $queryAktivasi = "SELECT id from user WHERE kode_konfirmasi='$aktivasi'";
    echo $aktivasi;
    $result = mysql_query($queryAktivasi);
    if(mysql_num_rows($result)>0)
    {
        $row = mysql_fetch_array($result);
        $id = $row['id'];
        echo $id;
        $queryUpdate = "UPDATE user SET isActive=1 WHERE id='$id'";
        $result = mysql_query($queryUpdate);
        header("Location: index.php");
        exit(0);
    }
}
header("Location: index.php?err=2");
?>
